import tornado.ioloop
import tornado.web

class MainHandler(tornado.web.RequestHandler):
    def get(self):
        u = self.get_argument('user')
        p = self.get_argument('psd')
        # print(u)
        # print(p)
        if u == 'liuqi' and p == '123':
            self.write('快来吧北鼻')
        else:
            self.write('滚')

    def post(self):
        print(123)
        self.write('POST')

application = tornado.web.Application([
    (r'/index', MainHandler),
])

if __name__ == '__main__':
    application.listen(8777)
    tornado.ioloop.IOLoop.instance().start()